package com.thread.threadfirst.marvel.citymaster.conf;
import org.springframework.stereotype.Component;

/**
 *
 */
@Component
public class RedisKeyGeneratorConfig {


    public RedisKeyGeneratorConfig() {

    }


    /**
     *关注key
     * @param cityId
     * @param userId
     * @return
     */
    public String getFocusKey(Long cityId, Long userId) {
        String key = "marvel:city:user:focus:" + cityId + ":" + userId;
        return key;
    }


    /**
     *收益key
     * @param cityId
     * @param userId
     * @return
     */
    public String getCityMasterIncomeKey(Long cityId, Long userId,Integer cityType) {
        String key = "marvel:city:user:cityType:" + cityId + ":" + userId + ":" + cityType;
        return key;
    }

}
